<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/9/20
 * Time: 11:44
 */
$ip = '192.168.29.244';
//strpos substr
$i = strpos($ip,".");
var_dump($i);
$a = substr($ip,0,$i);
var_dump($a);
$i2 = strpos($ip,".",$i+1);
var_dump($i2);
$b = substr($ip,$i+1,$i2-$i-1);
var_dump($b);;